Optimal. Leaf size=121 \[ \frac{b \left (6 a^2-b^2 \left (n^2-3 n+2\right )\right ) (a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (2,n+1,n+2,\frac{b \sec (c+d x)}{a}+1\right )}{6 a^4 d (n+1)}+\frac{\cos ^3(c+d x) (2 a-b (2-n) \sec (c+d x)) (a+b \sec (c+d x))^{n+1}}{6 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10479, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3874, 145, 65} \[ \frac{b \left (6 a^2-b^2 \left (n^2-3 n+2\right )\right ) (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \sec (c+d x)}{a}+1\right )}{6 a^4 d (n+1)}+\frac{\cos ^3(c+d x) (2 a-b (2-n) \sec (c+d x)) (a+b \sec (c+d x))^{n+1}}{6 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3874
Rule 145
Rule 65
Rubi steps
\begin{align*} \int (a+b \sec (c+d x))^n \sin ^3(c+d x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{(-1+x) (1+x) (a-b x)^n}{x^4} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac{\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}-\frac{\left (6-\frac{b^2 (1-n) (2-n)}{a^2}\right ) \operatorname{Subst}\left (\int \frac{(a-b x)^n}{x^2} \, dx,x,-\sec (c+d x)\right )}{6 d}\\ &=\frac{b \left (6 a^2-b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1+n;2+n;1+\frac{b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{6 a^4 d (1+n)}+\frac{\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}\\ \end{align*}
Mathematica [A] time = 1.70088, size = 155, normalized size = 1.28 \[ \frac{\cos (c+d x) (a+b \sec (c+d x))^n \left (-\frac{2 b \left (b^2 \left (n^2-3 n+2\right )-6 a^2\right ) \text{Hypergeometric2F1}\left (2,1-n,2-n,\frac{a \cos (c+d x)}{a \cos (c+d x)+b}\right )}{a (n-1)}-\frac{2 (2 a-b (n-2)) (a \cos (c+d x)+b)^2}{a}+8 \cos ^2\left (\frac{1}{2} (c+d x)\right ) (a \cos (c+d x)+b)^2\right )}{12 a d (a \cos (c+d x)+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.635, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\sec \left ( dx+c \right ) \right ) ^{n} \left ( \sin \left ( dx+c \right ) \right ) ^{3}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \sin \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-{\left (\cos \left (d x + c\right )^{2} - 1\right )}{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \sin \left (d x + c\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \sin \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]